<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box img {
        cursor: pointer;
        margin-right: 10px;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <img src="img/01.gif" alt="" srcset="" />
      <img src="img/02.gif" alt="" srcset="" />
      <img src="img/03.gif" alt="" srcset="" />
      <img src="img/04.gif" alt="" srcset="" />
      <img src="img/05.gif" alt="" srcset="" />
      <img src="img/06.gif" alt="" srcset="" />
      <img src="img/07.gif" alt="" srcset="" />
      <img src="img/08.gif" alt="" srcset="" />
      <img src="img/09.gif" alt="" srcset="" />
      <img src="img/10.gif" alt="" srcset="" />
      <img src="img/11.gif" alt="" srcset="" />
      <img src="img/12.gif" alt="" srcset="" />
    </div>

    发言框：
    <div id="message"></div>

    <script src="jquery/jquery-3.6.1.js"></script>

    <script>
      let imgs = $(".box img");
      let message = $("#message");

      imgs.on("click", (e) => {
        let target = e.target;
        let copy = $(target).clone();
        // 子元素
        message.append(copy);
        // message.prepend(copy);

        // 同级元素
        // message.before(copy);
        // message.after(copy);
      });
    </script>
  </body>
</html>
